package com.tang.controller;

import com.tang.sys.ResponseResult;
import com.tang.sys.service.IUploadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
public class UploadController {
    @Autowired
    private IUploadService iUploadService;

    @PostMapping("/upload")
    public ResponseResult uploadImg(MultipartFile img){
        return iUploadService.uploadImg(img);
    }
    //写动态上传图片
    @PostMapping("/blogupload")
    public ResponseResult bloguploadImg(MultipartFile img){

        return iUploadService.bloguploadImg(img);
    }
}
